﻿using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace NBA_Feed
{
    public class ItemViewModel : INotifyPropertyChanged
    {
        private string _rssName;
        /// <summary>
        /// Sample ViewModel property; this property is used in the view to display its value using a Binding.
        /// </summary>
        /// <returns></returns>
        public string RssName
        {
            get
            {
                return _rssName;
            }
            set
            {
                if (value != _rssName)
                {
                    _rssName = value;
                    NotifyPropertyChanged("RssName");
                }
            }
        }

        private string _rssUrl;
        /// <summary>
        /// Sample ViewModel property; this property is used in the view to display its value using a Binding.
        /// </summary>
        /// <returns></returns>
        public string RssUrl
        {
            get
            {
                return _rssUrl;
            }
            set
            {
                if (value != _rssUrl)
                {
                    _rssUrl = value;
                    NotifyPropertyChanged("RssUrl");
                }
            }
        }

        private string _rssImg;
        /// <summary>
        /// Sample ViewModel property; this property is used in the view to display its value using a Binding.
        /// </summary>
        /// <returns></returns>
        public string RssImage
        {
            get
            {
                return _rssImg;
            }
            set
            {
                if (value != _rssImg)
                {
                    _rssImg = value;
                    NotifyPropertyChanged("RssImage");
                }
            }
        }
        
        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}